#ifndef SEPTDC_H
#define SEPTDC_H
#include "Player.h"
#include "Deck.h"

const int NB_MAX_PLAYER = 3;
const int MAX_CARD_ON_TABLE = 52;
const int MAX_CARD_OFF_TYPE = 13;
const int START_VALUE = 7;
const int START_INDEX = 6;

const int WIN_CONDITION = 0;

struct septdc
{
	bool firstCardPLayedHeart = false;
	bool firstCardPLayedClub = false;
	bool firstCardPLayedSpade = false;
	bool firstCardPLayedDiamond = false;

	int nbCardsInHeart = 0;
	int nbCardsInDiamonds = 0;
	int nbCardsInClubs = 0;
	int nbCardsInSpades = 0;

	int heartUpIndex = 0;
	int heartDownIndex = 0;

	int diamondUpIndex = 0;
	int diamondDownIndex = 0;

	int clubUpIndex = 0;
	int clubDownIndex = 0;

	int spadeUpIndex = 0;
	int spadeDownIndex = 0;

	player players[NB_MAX_PLAYER];
	card diamonds[MAX_CARD_OFF_TYPE];
	card spades[MAX_CARD_OFF_TYPE];
	card hearts[MAX_CARD_OFF_TYPE];
	card clubs[MAX_CARD_OFF_TYPE];
	deck gameDeck;
};

void Initialize(septdc& sv);
void Display(septdc& sv);
void Play(septdc& sv);
void AddCardToType(septdc& sv, card& c);
void Distribute(septdc& sv);
bool CheckVictory(septdc& sv);
bool CheckPlayability(septdc& sv, card& c);
bool CheckHandPlayability(septdc& sv, player& p);

#endif